#ifndef THINK_THINK_ENV_H
#define THINK_THINK_ENV_H

static char* think_env =
	"\n"
	"// +----------------------------------------------------------------------\n"
	"// | ThinkPHP [ WE CAN DO IT JUST THINK ]\n"
	"// +----------------------------------------------------------------------\n"
	"// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.\n"
	"// +----------------------------------------------------------------------\n"
	"// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )\n"
	"// +----------------------------------------------------------------------\n"
	"// | Author: liu21st <liu21st@gmail.com>\n"
	"// +----------------------------------------------------------------------\n"
	"\n"
	"namespace think;\n"
	"\n"
	"class Env\n"
	"{\n"
	"    /**\n"
	"     * 获取环境变量值\n"
	"     * @access public\n"
	"     * @param  string $name    环境变量名（支持二级 . 号分割）\n"
	"     * @param  string $default 默认值\n"
	"     * @return mixed\n"
	"     */\n"
	"    public static function get($name, $default = null)\n"
	"    {\n"
	"        $result = getenv(ENV_PREFIX . strtoupper(str_replace(\'.\', \'_\', $name)));\n"
	"\n"
	"        if (false !== $result) {\n"
	"            if (\'false\' === $result) {\n"
	"                $result = false;\n"
	"            } elseif (\'true\' === $result) {\n"
	"                $result = true;\n"
	"            }\n"
	"\n"
	"            return $result;\n"
	"        }\n"
	"\n"
	"        return $default;\n"
	"    }\n"
	"}\n"
	"\n"
;
#endif